package com.king.springframework.beans.factory.support;

import com.king.springframework.beans.BeanException;
import com.king.springframework.core.io.Resource;
import com.king.springframework.core.io.ResourceLoader;

public interface BeanDefinitionReader {
    //获取注册表
    BeanDefinitionRegistry getRegistry();

    //获取资源加载器
    ResourceLoader getResourceLoader();

    /**
     * 加载资源
     * @param resource
     * @throws BeanException
     */
    void loadBeanDefinitions(Resource resource) throws BeanException;

    void loadBeanDefinitions(Resource... resources) throws BeanException;

    void loadBeanDefinitions(String location) throws BeanException;

    void loadBeanDefinitions(String... locations) throws BeanException;
}
